import 'dart:core';

import '../utils/screw.dart';

class JournalItem {
  int id;
  String month;
  String date;
  String category;
  String detail;

  JournalItem({this.id, this.month, this.date, this.category, this.detail});

  bool isEqual(JournalItem another) {
    var firstBody = date + category + detail;
    var firstSign = Screw.genMD5(firstBody);
    var secondBody = another.date + another.category + another.detail;
    var secondSign = Screw.genMD5(secondBody);
    return firstSign == secondSign;
  }
}
